﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Http;
using System.Text;
using System.Web;

namespace ProjBackEnd
{
    public class ControllerHelper
    {
        /// <summary>
        /// 将json转换为web api可返回的类
        /// </summary>
        /// <param name="json"></param>
        /// <returns></returns>
        public static HttpResponseMessage GetResponse(string json)
        {
            HttpResponseMessage hrm = new HttpResponseMessage
            {
                Content = new StringContent(json, Encoding.UTF8, "application/json"),
            };

            return hrm;
        }
    }
}